package cn.wolfcode.p2p.business.service;

import java.math.BigDecimal;

import cn.wolfcode.p2p.base.domain.Account;
import cn.wolfcode.p2p.business.domain.Bid;
import cn.wolfcode.p2p.business.domain.BidRequest;
import cn.wolfcode.p2p.business.domain.CreditTransfer;
import cn.wolfcode.p2p.business.domain.MoneyWithdraw;
import cn.wolfcode.p2p.business.domain.PaymentSchedule;
import cn.wolfcode.p2p.business.domain.PaymentScheduleDetail;
import cn.wolfcode.p2p.business.domain.RechargeOffline;

/**
 * 账户流水服务
 * 
 * @author wolfcode
 *
 */
public interface IAccountFlowService {

	/**
	 * 创建线下充值流水
	 */
	void createRechargeOfflineFlow(Account account, RechargeOffline ro);

	/**
	 * 创建投标流水
	 * 
	 * @param borrowAccount
	 * @param bid
	 */
	void createBidFlow(Account borrowAccount, Bid bid);

	/**
	 * 满审拒绝投标失败流水
	 * 
	 * @param bidAccount
	 * @param bid
	 */
	void createBidFaildFlow(Account bidAccount, Bid bid);

	/**
	 * 借款成功,借款人借款到账流水
	 * 
	 * @param borrowAccount
	 * @param br
	 */
	void createBorrowSuccessFlow(Account borrowAccount, BidRequest br);

	/**
	 * 支付借款手续费流水
	 * 
	 * @param borrowAccount
	 * @param br
	 * @param manageFee
	 */
	void createManageFeeFlow(Account borrowAccount, BidRequest br, BigDecimal manageFee);

	/**
	 * 创建投标成功流水
	 * 
	 * @param bidAccount
	 * @param bid
	 */
	void createBidSuccessFlow(Account bidAccount, Bid bid);

	/**
	 * 生成提现申请冻结流水
	 * 
	 * @param account
	 * @param mw
	 */
	void createWithdrawFlow(Account account, MoneyWithdraw mw);

	/**
	 * 创建提现审核拒绝流水
	 * 
	 * @param account
	 * @param mw
	 */
	void createWithdrawFaildFlow(Account account, MoneyWithdraw mw);

	/**
	 * 创建提现成功流水
	 * 
	 * @param account
	 * @param mw
	 */
	void createWithdrawSuccessFlow(Account account, MoneyWithdraw mw);

	/**
	 * 提现支付手续费流水
	 * 
	 * @param account
	 * @param mw
	 */
	void createWithdrawFeeFlow(Account account, MoneyWithdraw mw);

	/**
	 * 生辰还款流水
	 * 
	 * @param borrowAccount
	 * @param ps
	 */
	void createReturnMoneyFlow(Account borrowAccount, PaymentSchedule ps);

	/**
	 * 投资人回款流水
	 * 
	 * @param bidAccount
	 * @param psd
	 */
	void createReceiveMoneyFlow(Account bidAccount, PaymentScheduleDetail psd);

	/**
	 * 生成支付利息管理费流水
	 * 
	 * @param bidAccount
	 * @param ps
	 * @param interestFee
	 */
	void createInterestFeeFlow(Account bidAccount, PaymentScheduleDetail psd, BigDecimal interestFee);

	/**
	 * 生成认购债权标成功流水
	 * 
	 * @param subscriberAccount
	 * @param ct
	 */
	void createSubscribeFlow(Account subscriberAccount, CreditTransfer ct);

	/**
	 * 生成转让债权标成功流水
	 * @param transAccount
	 * @param ct
	 */
	void createTransferFlow(Account transAccount, CreditTransfer ct);

}
